import { WeaTools } from 'ecCom';
/** 合同 */
export const getContractReport = (type, params) => WeaTools.callApi(`/api/crm/report/contract/${type}`, 'POST', params);

export const getContractReportExcel = (type, params) => WeaTools.callApi(`/api/crm/report/contract/${type}Export`, 'POST', params);
/** 商机 */
export const getChanceReport = (type, params) => WeaTools.callApi(`/api/crm/report/sellChance/${type}`, 'POST', params);

export const getChanceReportExcel = (type, params) => WeaTools.callApi(`/api/crm/report/sellChance/${type}Export`, 'POST', params);

/** 客户 */
export const getTableList = (routerParams, requestParams) => WeaTools.callApi(`/api/crm/report/customer/${routerParams.type}`, 'POST', requestParams);

export const getEveList = (routerParams, requestParams) => WeaTools.callApi('/api/crm/report/customer/evaList', 'POST', requestParams);

export const getReportEvaListExcel = requestParams => WeaTools.callApi('/api/crm/report/customer/evaExport', 'POST', requestParams);


export const getAddressChartCondition = () => WeaTools.callApi('/api/crm/report/customer/customers', 'POST');

export const getCustomerTypes = () => WeaTools.callApi('/api/crm/customer/customerType', 'GET');

/** 产品 */
export const getProductList = params => WeaTools.callApi('/api/crm/report/product/list', 'POST', params);

/** 联系情况 */
export const getContactLogReport = params => WeaTools.callApi('/api/crm/report/contactLog/list', 'POST', params);
/** 联系情况-完成动作 */
export const doFinishWorkPlan = params => WeaTools.callApi('/api/crm/contactLog/finishWorkPlan', 'GET', params);
